<?php
$id = $_POST['id'];
$user = $_POST['user'];
$conn = new mysqli("localhost", "root", "", "simple_weibo");
$conn->query("set names 'utf8'");

$sql = "delete from weibo_sc where user='".$user."' and weibo_id='".$id."'";
$res = $conn->query($sql);

if($res){
    echo "取消收藏成功";
}else {
    echo "取消收藏失败";
}
